import {get, post, del, put} from "@/apis/http/request";
import {DicItem} from "@/apis/model/system/DicItemModel";

/**
 * 得到列表
 * @param params
 */
export const getDicItemList = (params: any) => get("/dicItem/list", params)

/**
 * 得到分页列表
 * @param params
 */
export const dicItemPage = (params: any) => post("/dicItem/page", params)

/**
 * 删除数据
 * @param id
 * @returns
 */
export const deleteDicItemById = (id: number) => del("/dicItem/delete/" + id)

/**
 * 新增数据
 * @param param
 */
export const insertDicItem = (param: DicItem) => post("/dicItem", param)

/**
 * 更新数据
 * @param param
 */
export const updateDicItem = (param: DicItem) => put("/dicItem", param)

/**
 * 得到数据选择项
 * @param dicCode
 */
export const listDicItems = (dicCode: string) => get("/dicItem/listDicItem/" + dicCode)
